import java.util.*;

public class Main3 {
    public static void main(String[] args)
    {
        Scanner cin = new Scanner(System.in);
        int n =cin.nextInt();

        int arr[] = new int[n];

        for(int i =0;i<n;i++)
        {
            arr[i] = cin.nextInt();
        }

        int left = 0,right =n-1;

        while(left<right)
        {
            System.out.print(arr[left++]+" "+arr[right--]+"\n");
        }

        cin.close();
    }
}
